package edu.metrostate.capstonediner;

public class Player extends GamePart{
	
	public Player() {
		layer = Constants.PLAYER_LAYER;
		width = 32f;
		height = 32f;
		x = 0f;
		y = Constants.SCREEN_HEIGHT - height * 2f;
		texture = Constants.PLAYER_TEXTURE;
		hitPoints = 100;
		pointValue = 0;
	}
	
	public void collisionEffect(GamePart collided, Game game) {
		collided.setHitPoints(collided.getHitPoints() - hitPoints);
	}
	
	public void setHitPoints(int newHitPoints) {
		if(newHitPoints > 100) hitPoints = 100;
		else hitPoints = newHitPoints;
	}
}
